<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006~2018 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------
use think\Route;

Route::post('user/registered', 'app\index\controller\User@addUser');    //用户注册   post
Route::post('user/info/change', 'app\index\controller\User@editUser');    //用户基本信息修改  post
Route::post('user/get/code', 'app\index\controller\User@getUserCode');    //用户二维码获取  post

Route::post('user/add/address', 'app\index\controller\User@addAddress');    //用户添加收货地址   post
Route::post('user/edit/address', 'app\index\controller\User@editAddress');    //用户修改收货地址   post
Route::post('user/show/address', 'app\index\controller\User@showAddress');    //用户展示收货地址   post
Route::post('user/show/addressInfo', 'app\index\controller\User@showAddressInfo');    //用户展示收货地址详细信息   post
Route::post('user/del/address', 'app\index\controller\User@delAddress');    //用户展示收货地址   post
Route::post('user/add/dft/addr', 'app\index\controller\User@addDefaultAddress');    //添加默认收货地址   post

Route::post('user/add/tel', 'app\index\controller\User@addUserTel');    //绑定用户手机号   post

Route::post('user/check/address', 'app\index\controller\User@delAddress');    //用户展示收货地址   post

Route::post('get/user/openid', 'app\index\controller\User@getOpenId');    //获取用户openid   get

Route::post('user/check/shop', 'app\index\controller\User@checkUserShop');    //校验用户是否开通商户   post


Route::post('user/show/order', 'app\index\controller\User@showOrder');    //用户展示订单   post
Route::post('user/show/orderInfo', 'app\index\controller\User@showOrderInfo');    //用户展示订单详情   post
//Route::post('user/integral/Money', 'app\index\controller\User@integralToMoney');    //积分转换为金钱   post  //暂时取消

//Route::post('user/add/distribution', 'app\index\controller\User@addDistributionUser');    //加入分销   post

Route::post('user/create/bargain', 'app\index\controller\User@createBargainOrder');    //创建砍价商品   post

Route::post('user/edit/bargain', 'app\index\controller\User@editBargainOrder');    //好友砍价   post
Route::post('user/show/bargain', 'app\index\controller\User@showBargainGoods');    //显示砍价商品   post
Route::post('user/comment/Goods', 'app\index\controller\User@commentGoods');    //评价商品   post
Route::post('user/showInfo', 'app\index\controller\User@showUserInfo');    //显示用户中   post

Route::post('user/bargain/list', 'app\index\controller\User@showBargainOrder');    //用户端砍价商品显示   post

Route::post('add/user/shoppingCart', 'app\index\controller\User@addShoppingCart');    //添加购物车   post
Route::post('show/user/shoppingCart', 'app\index\controller\User@showShoppingCart');    //购物车显示   post
Route::post('del/user/shoppingCart', 'app\index\controller\User@delShoppingCart');    //删除购物车商品   post


Route::post('create/shop', 'app\shop\Shop@addShop');    //创建商户   post
Route::post('edit/shop', 'app\shop\Shop@editShop');    //修改商户   post
Route::post('del/shop', 'app\shop\Shop@delShop');    //删除商户   post
Route::post('show/shop/info', 'app\shop\Shop@shopInfo');    //显示商户信息   post
Route::post('search/shop', 'app\shop\Shop@searchShop');    //搜索商户信息   post
Route::post('show/shop/attention/status', 'app\shop\Shop@showShopAttentionStatus');    //店铺关注状态   post
Route::post('show/shop/goods/attention/status', 'app\shop\ShopGoods@showGoodsAttentionStatus');    //关注商品状态   post

Route::post('add/shop/bank/card', 'app\shop\Shop@addBankCard');    //商户添加银行卡   post
Route::post('edit/shop/bank/card', 'app\shop\Shop@editBankCard');    //商户修改银行卡   post
Route::post('show/shop/bank/card', 'app\shop\Shop@showBankCardInfo');    //展示商户银行卡   post
Route::get('test/test', 'app\shop\Shop@test');    //展示商户银行卡   post

Route::post('add/friend/shop', 'app\shop\Shop@addFriendShop');    //添加友情店铺   post
Route::post('edit/friend/shop', 'app\shop\Shop@editFriendShop');    //取消友情店铺   post
Route::post('show/friend/shop', 'app\shop\Shop@showFriendShop');    //显示友情店铺   post


Route::post('show/hot/shop', 'app\shop\Shop@showShop');    //展示人气商户   post
Route::get('show/type/shop', 'app\shop\Shop@showType');    //展示商户分类   get
Route::post('show/type/shopInfo', 'app\shop\Shop@showTypeShop');    //展示类别下商户展示   post
Route::post('shop/hot/change', 'app\shop\Shop@changeShopHot');    //展示类别下商户展示   post

Route::post('add/goods/type', 'app\shop\Shop@addGoodsType');    //添加商品分类   post
Route::post('edit/goods/type', 'app\shop\Shop@editGoodsType');    //修改商品分类   post
Route::post('del/goods/type', 'app\shop\Shop@delGoodsType');    //删除商品分类   post
Route::get('show/goods/type', 'app\shop\Shop@showTypeGoods');    //显示商品分类   get

Route::post('add/goods/rotation', 'app\shop\Shop@addTypeRotation');    //添加商品轮播图   post
Route::post('show/goods/rotation', 'app\shop\Shop@showTypeRotation');    //展示商品轮播图   post
Route::post('del/goods/rotation', 'app\shop\Shop@delTypeRotation');    //删除商品轮播图   post


Route::post('show/shop/type', 'app\shop\Shop@showTypeGoods');    //展示商户首页分类   post
Route::post('show/type/goods', 'app\shop\Shop@showGoodsList');    //展示商户分类下的商品   post
Route::post('show/type/showGoodsList_agency', 'app\shop\Shop@showGoodsList_agency');    //展示商户分类下的代理商品   post
Route::get('show/goodsInfo', 'app\shop\Shop@showGoods');    //展示商品详情   get
Route::get('show/showAnnexShop', 'app\shop\Shop@showAnnexShop');    //附近商家显示   get

Route::post('show/wek/order', 'app\shop\Shop@showWekOrder');    //显示7天交易量   post
Route::get('show/hot/goods', 'app\shop\Shop@showGoodsNumber');    //热卖商品展示  get

Route::post('show/shop/plugin/status', 'app\shop\Shop@showShopPlugin');    //显示商家插件  post
Route::post('edit/shop/plugin/status', 'app\shop\Shop@editShopPlugin');    //修改商家插件  post

Route::post('show/shop/users', 'app\shop\Shop@showShopUser');    //店铺会员展示  post


Route::post('add/shop/goods', 'app\shop\ShopGoods@addGoods');    //添加商品 post
Route::post('edit/shop/goods', 'app\shop\ShopGoods@edit');    //修改商品  post
Route::post('del/shop/goods', 'app\shop\ShopGoods@delGoods');    //修改商品  post
Route::post('show/shop/admin/goods', 'app\shop\ShopGoods@showGoodsList');    //显示商品列表 商户端  post
Route::post('show/shop/admin/supply_of_goods', 'app\shop\ShopGoods@supply_of_goods');    //显示商品列表 商户端  post


Route::post('show/shop/admin/goodsInfo', 'app\shop\ShopGoods@showGoodsInfo');    //显示商品详情 商户端  post
Route::post('show/user/shop/bargain/info', 'app\shop\ShopGoods@showGoodsBargainInfo');    //商品下砍价信息展示  post

Route::post('create/goods/bargain', 'app\shop\ShopGoods@createBargainGoods');    //创建砍价商品  post
Route::post('edit/goods/bargain', 'app\shop\ShopGoods@editBargainGoods');    //修改砍价商品  post
Route::post('del/goods/bargain', 'app\shop\ShopGoods@delBargainGoods');    //删除砍价商品  post
Route::post('show/goods/bargain', 'app\shop\ShopGoods@showBargainGoods');    //显示砍价商品列表  post
Route::get('show/goods/bargainInfo', 'app\shop\ShopGoods@showBargainGood');    //显示砍价商品详细信息  get
Route::post('change/goods/type', 'app\shop\ShopGoods@changeGoodsType');    //修改商品分类  post


Route::post('create/goods/order', 'app\order\Order@createOrder');    //创建订单  post
Route::post('pay/goods/order', 'app\order\Order@waitPay');    //创建订单  post
Route::post('show/shop/goods/order', 'app\order\Order@show');    //商户订单列表显示  post
Route::post('ship/goods/order', 'app\order\Order@ship');    //发货  post
Route::post('end/goods/order', 'app\order\Order@ship');    //订单完成  post
Route::post('edit/order/send/status', 'app\order\Order@confirmReceipt');    //订单完成  post

Route::get('end/goods/test', 'app\order\Order@test');    //订单完成  post


Route::get('show/city', 'app\shop\Shop@showCity');    //显示市  get
Route::get('show/province', 'app\shop\Shop@showProvince');    //显示省份  get
Route::get('show/district', 'app\shop\Shop@showDistrict');    //显示区县  get


Route::post('add/shop/proxy/goods', 'app\shop\ShopGoods@addProxyGoods');    //添加代理商品  post
Route::post('show/shop/proxy/shop', 'app\shop\ShopGoods@showProxyShop');    //显示代理商户  post
Route::post('show/shop/proxy/goods', 'app\shop\ShopGoods@showProxyGoods');    //显示代理商户下的代理商品  post


Route::post('show/shop/goods/list', 'app\shop\ShopGoods@showAllGoodsList');    //商品列表  post


Route::post('weChat/pay/notify', 'app\pay\WeChatPay@notifyUrl');    //微信回调接口  post
Route::post('weChat/pay', 'app\pay\WeChatPay@WxPay');    //微信回调接口  post

Route::get('get/version/number', 'app\index\controller\User@getVersionNumber');//获取版本号 get

////////////////////////////////-------------后台接口---------------------//////////////////////////
Route::get('show/admin/shop', 'app\shop\Shop@showAdminShop');    //热卖商品展示  get

Route::post('show/Admin/orderNum', 'app\order\Order@showOrderNum');    //显示订单号  post
Route::get('admin/end/goods/order', 'app\order\Order@getOrderNumber');    //今日交易总订单  get
Route::post('admin/show/orderInfo', 'app\order\Order@showOrderInfo');    //显示订单详情 post

Route::get('admin/show/hot/goods', 'app\order\Order@showHotGoods');    //显示热卖商品 get
Route::get('admin/show/proxy/goods', 'app\order\Order@showProxyGoods');    //显示代理最多的商品 get
Route::get('admin/show/ratings/goods', 'app\order\Order@showRatingsGoods');    //显示代理最多的商品 get
Route::get('admin/show/returns/goods', 'app\order\Order@showReturnsGoods');    //退货 get


Route::post('admin/login', 'app\admin\controller\Login@login');    //登陆 post
Route::get('admin/platform/fees', 'app\admin\controller\Platform@feesStatistics');    //平台手续费 get


Route::post('admin/user/relationship', 'app\index\controller\User@showMemberRelationship');    //用户关系展示 post
Route::post('admin/search/shopInfo', 'app\shop\Shop@searchAdminInfo');    // 商户信息展示  post

Route::post('admin/add/proxy', 'app\admin\controller\Platform@addProxy');    // 商户信息展示  post

Route::post('admin/shop/review/change', 'app\admin\controller\Index@shopReviewChange');    // 商户状态修改  post


Route::get('admin/show/province', 'app\admin\controller\Platform@showProvince');    // 省代区域显示  get
Route::get('admin/show/municipal', 'app\admin\controller\Platform@showMunicipal');    // 省代区域显示  get

Route::get('admin/show/commission', 'app\admin\controller\Platform@showCommission');    // 省代区域显示  get


Route::post('review/withdraw', 'app\withdraw\WithdrawReview@withdrawReview');    // 提现申操作  post
Route::post('user/withdraw', 'app\withdraw\WithdrawApplication@addWithdraw');    //发起提现   post
Route::post('show/user/withdraw/total', 'app\withdraw\ShowWithdraw@showWithdrawSuccessMoney'); //提现页面展示   post
Route::post('show/withdraw/order', 'app\withdraw\ShowWithdraw@withdrawShow');    //提现显示   post


Route::get('end/order', 'app\order\Order@endOrder');    // 省代区域显示  get

Route::post('send/mgs', 'app\user\User@sendMsg');    // 发送短信  post
Route::get('get/verification', 'app\user\User@createVerificationCode');    // 短信验证  get

///////////////////////--------------新增功能-------------------///////////////////////////////
Route::post('show/friend/ship/shop', 'app\shop\Shop@getFriendShipShop');    //友情店铺  post
Route::post('show/friend/ship/shop/total', 'app\shop\Shop@getFriendShipShopTotal');    //友情店铺总条数  post

Route::post('show/search/goods', 'app\shop\ShopGoods@searchGoods');    //搜索商品  post
Route::post('show/search/goods/total', 'app\shop\ShopGoods@searchGoodsTotal');    //搜索商品总数  post

Route::post('show/shop/info/info', 'app\shop\Shop@getShopInfoInfo');    //搜索商品总数  post

Route::post('add/user/goods/attention', 'app\user\User@attentionGoods');    //收藏商品  post
Route::post('add/user/shop/attention', 'app\user\User@attentionShop');    //关注店铺  post
Route::post('add/user/order/comment', 'app\user\User@userCommentOrder');    //添加评论  post

Route::post('show/user/collection/good', 'app\user\User@showCollectionGoods');    //显示收藏商品  post
Route::post('show/user/collection/shop', 'app\user\User@showCollectionShop');    //显示收藏店铺  post
Route::post('show/user/goods/bargain', 'app\user\User@showUserGoodsBargain');    //显示砍价列表  post

Route::post('user/del/goods/order', 'app\user\User@delGoodsOrder');    //用户订单删除  post

Route::post('user/del/goods/bargain', 'app\user\User@delUserGoodsBargain');    //用户删除砍价商品  post


Route::post('show/order/comment', 'app\shop\Shop@showCommentOrder');    //展示商户评论  post

Route::post('admin/supply/supply_business', 'app\supply\Supply@supply_business');//供货商列表
Route::post('admin/supply/supply_goods', 'app\supply\Supply@supply_goods');//供货商商品详情agent

Route::get('admin/proxy/timing_receiving', 'app\shell\Proxy@timing_receiving');//七天自动收货


Route::post('admin/supply/agent', 'app\supply\Supply@agent');//代理商商品代理
Route::post('admin/supply/commodity',"app\supply\Supply@commodity");//代理商品
Route::post('admin/supply/cancelt'.'app\supply\Supply@cancelt');//商户取消代理或修改分类


Route::post('admin/supply/canceltd',"app\supply\Supply@canceltd");//代理商品

Route::post('shop/shop/brokerage', 'app\shop\Shop@brokerage');   //商家友情佣金
Route::post('shop/shop/brokerage_set', 'app\shop\Shop@brokerage_set');   //商家友情佣金设置
return [
    '__pattern__' => [
        'name' => '\w+',
    ],
    '[hello]' => [
        ':id' => ['index/hello', ['method' => 'get'], ['id' => '\d+']],
        ':name' => ['index/hello', ['method' => 'post']],
    ],

];
